// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui' // 先安装elementUI  npm install element-ui
import 'element-ui/lib/theme-chalk/index.css'
import * as API from '@/api';
import store from '@/store'
import './mock/index'; // 先安装  npm install mockjs
// 使用插件
Vue.use(ElementUI)
Vue.config.productionTip = false
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  //全局事件
  beforeCreate() {
    Vue.prototype.$API = API.default;
  },
  components: { App },
  template: '<App/>'
})
